//
//  FloatTool.m
//  Today
//
//  Created by dllo on 15/5/25.
//  Copyright (c) 2015年 fanfan. All rights reserved.
//

#import "FloatTool.h"

@implementation FloatTool
+ (CGFloat)getHeightWithFont:(CGFloat)font labelWidth:(CGFloat)width string:(NSString *)string
{
    CGSize size = CGSizeMake(width, 1000);
    NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithObject:[UIFont systemFontOfSize:font] forKey:NSFontAttributeName];
    CGRect frame = [string boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    return frame.size.height;
}
@end
